import 'package:flutter_test/flutter_test.dart';
import 'package:alex_tools/alex_tools.dart';
import 'package:alex_tools/alex_tools_platform_interface.dart';
import 'package:alex_tools/alex_tools_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockAlexToolsPlatform
    with MockPlatformInterfaceMixin
    implements AlexToolsPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final AlexToolsPlatform initialPlatform = AlexToolsPlatform.instance;

  test('$MethodChannelAlexTools is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelAlexTools>());
  });

  test('getPlatformVersion', () async {
    AlexTools alexToolsPlugin = AlexTools();
    MockAlexToolsPlatform fakePlatform = MockAlexToolsPlatform();
    AlexToolsPlatform.instance = fakePlatform;

    expect(await alexToolsPlugin.getPlatformVersion(), '42');
  });
}
